import request from "../request";
export function searchJbgl(query) {
    return request({
        url: '/attendtheme/attendlist',
        method: 'get',
        data: query
    })
}
//加班详情查询
export function searchJbInfo(query) {
    return request({
        url: '/workTimeDetails/list',
        method: 'get',
        data: query
    })
}
//获取员工详情信息
export function getUserInfo(query) {
    return request({
        url: '/workbench/userBase/selectBaseUser',
        method: 'get',
        data: query
    })
}
//查询是否为假期
export function searchHoliday(query) {
    return request({
        url: '/holiday/selectHoliday',
        method: 'get',
        data: query
    })
}
//加班详情新增或修改
export function addOrUpdateJbInfo(data) {
    if (data.id) {
        return updateJbInfo(data)
    }
    return addJbInfo(data)
}
//加班详情新增
export function addJbInfo(data) {
    return request({
        url: '/workTimeDetails',
        method: 'post',
        data: data
    })
}

//加班详情修改
export function updateJbInfo(data) {
    return request({
        url: '/workTimeDetails',
        method: 'put',
        data: data
    })
}